include(${CMAKE_SOURCE_DIR}/llvm_ide_common.cmake)
include_directories( ${CMAKE_SOURCE_DIR}/3rdPart/tinyxml)
add_definitions(-DTIXML_USE_STL)

include_directories( ${CMAKE_SOURCE_DIR}/lua/src)
include_directories( ${CMAKE_SOURCE_DIR}/lua/etc)

require_gtk_headers()

IF(MSVC)
	SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
ENDIF(MSVC)

set( LLVM_IDE_SOURCE 
	main.cpp 
	logManager.h
	logManager.cpp
	xmlWidgetEventHandler.h
	xmlWidgetEventHandler.cpp
	xmlWidgetLuaEngine.h
	xmlWidgetLuaEngine.cpp
	
	xmlWidget.h
	xmlWidget.cpp
	xmlWidgetWindow.cpp
	xmlWidgetMenu.cpp
	xmlWidgetDialog.cpp
)
require_gtk_lib_path()

add_executable( LLVM-IDE WIN32 MACOSX_BUNDLE ${LLVM_IDE_SOURCE} )

target_link_libraries(LLVM-IDE tinyxml liblua gtk-win32-2.0 gobject-2.0 )

install(TARGETS LLVM-IDE RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/bin )
